package routers

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"week2a/controllers"
)

func Router(r *gin.Engine) {
	api := r.Group("/api")
	{
		api.GET("/health", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{
				"code":    http.StatusOK,
				"message": "api：：：：pong",
			})
		})

		api.GET("/video", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{
				"code":    http.StatusOK,
				"message": "视频列表",
				"data":    nil,
			})
		})
	}
	video := r.Group("/video")
	{
		video.POST("/sync", controllers.SyncVideoEs)
		video.GET("/highlight", controllers.HighlightVideoEs)
		video.GET("/list", controllers.VideoList)
	}

}
